﻿namespace Bootstrap5;

public static class ToastServiceExtensions
{
	public static void Show(this IToastService toastService, string message, string title = default, Color? color = default,string key="Default")
	=> toastService.Show(options =>
	{
		options.Message = message;
		options.Title = title;
		options.Color = color;
		options.Key = key;
	});

	public static void ShowPrimary(this IToastService toastService, string message, string title = default,  string key = "Default")
	=> toastService.Show(message, title, Color.Primary);

	public static void ShowSuccess(this IToastService toastService, string message, string title = default,string key = "Default")
	=> toastService.Show(message, title, Color.Success);

	public static void ShowDanger(this IToastService toastService, string message, string title = default, string key = "Default")
	=> toastService.Show(message, title, Color.Danger);

	public static void ShowWarning(this IToastService toastService, string message, string title = default,  string key = "Default")
	=> toastService.Show(message, title, Color.Warning);

	public static void ShowInfo(this IToastService toastService, string message, string title = default,  string key = "Default")
	=> toastService.Show(message, title, Color.Info);

	public static void ShowDark(this IToastService toastService, string message, string title = default, string key = "Default")
	=> toastService.Show(message, title, Color.Dark);
	public static void ShowSecondary(this IToastService toastService, string message, string title = default, string key = "Default")
	=> toastService.Show(message, title, Color.Secondary);

	public static void ShowLight(this IToastService toastService, string message, string title = default, string key = "Default")
	=> toastService.Show(message, title, Color.Light);
}
